<template>
	<div class="error">
		<div class="content">
			<div class="text">404</div>
			<div class="btn" @click="onGoHome">返回首页</div>
		</div>
	</div>
</template>

<script setup lang="ts" name="notFound">
import { useRouter } from 'vue-router';

// 定义变量内容
const router = useRouter();

// 返回首页
const onGoHome = () => {
	router.push('/');
};
</script>

<style scoped lang="scss">
.error {
	height: 100vh;
  width: 100vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text {
  font-size: 56px;
}

.btn {
  background: #3061f2;
  color: #fff;
  text-align: center;
  line-height: 32px;
  border-radius: 16px;
  margin-top: 20px;
  cursor: pointer;
}
</style>
